﻿<UserControl x:Class="SsTool.Core.Parts.ShortcutsPart"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="500">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <Button Name="_ctlBtnCreate" Click="_ctlBtnCreate_Click" Margin="5,5,0,5">
                <StackPanel Orientation="Horizontal">
                    <Image Source="../../Resources/new.png" Margin="0,0,5,0"/>
                    <TextBlock Text="添加" VerticalAlignment="Center"/>
                </StackPanel>
            </Button>
            <Button Name="_ctlBtnDelete" Click="_ctlBtnDelete_Click" Margin="5,5,0,5">
                <StackPanel Orientation="Horizontal">
                    <Image Source="../../Resources/save.png" Margin="0,0,5,0"/>
                    <TextBlock Text="删除" VerticalAlignment="Center"/>
                </StackPanel>
            </Button>
            <Button Name="_ctlBtnRefresh" Click="_ctlBtnRefresh_Click" Margin="5,5,0,5">
                <StackPanel Orientation="Horizontal">
                    <Image Source="../../Resources/detail.png" Margin="0,0,5,0"/>
                    <TextBlock Text="刷新" VerticalAlignment="Center"/>
                </StackPanel>
            </Button>
        </StackPanel>
        <DataGrid Name="_ctlGridShortcuts" Grid.Row="1" AutoGenerateColumns="False" CanUserAddRows="True" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="名称" Binding="{Binding Path=Caption}"/>
                <DataGridTextColumn Header="导航名称" Binding="{Binding Path=Navigation.Caption}"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>
